import React ,{Component}  from 'react';
import User from './User'
const user ={
	firstName :'Joni',
	lasteName : 'Socor',
	toString :function(){
		return this.firstName + this.lasteName;
	}
};

function show(user){

	let k = new User({firstName:"aa"});
	console.log(k.firstName);
	if(user.firstName === 'Joni'){
		return (
				<p> go on {user.toString()}</p>
			);	
	}else{
		return (
				<p> look at {user.toString()}</p>
			);	
	}
}

class HelloWorld extends Component{
  
	render(){
		return ( 
			<div>
				<div>
					<h1>{user.toString()}</h1>	
				</div>
				<div>
					{show(user)}
				</div>
			</div>
		);	
	}
}
export default HelloWorld;